package com.fqgj.xjd.user.client.enums;

/**
 * @program: cashmama-user
 * @description
 * @author: frank
 * @create: 2020-11-03 10:23
 **/
public enum AppCodePackageNameEnum {

    CASH_MAMA("5", "in.cashmama.app"),
    LOAN_ZONE("38", "com.vayloan.app"),
    CASH_ZONE("39", "in.cashzone.app"),
    MERA_LOAN("40", "in.meraloan.app");

    AppCodePackageNameEnum(String appCode, String packageName) {
        this.appCode = appCode;
        this.packageName = packageName;
    }

    private String appCode;
    private String packageName;

    public String getAppCode() {
        return appCode;
    }

    public AppCodePackageNameEnum setAppCode(String appCode) {
        this.appCode = appCode;
        return this;
    }

    public String getPackageName() {
        return packageName;
    }

    public AppCodePackageNameEnum setPackageName(String packageName) {
        this.packageName = packageName;
        return this;
    }

    public static AppCodePackageNameEnum getEnumByType(String appCode) {
        AppCodePackageNameEnum appCodePackageNameEnum = null;
        for (AppCodePackageNameEnum enumObj : AppCodePackageNameEnum.values()) {
            if (enumObj.getAppCode().equals(appCode)) {
                appCodePackageNameEnum = enumObj;
                break;
            }
        }
        return appCodePackageNameEnum;
    }

}
